﻿ using System;
using System.Collections.Generic;

namespace Ayatta.Contract.Domain
{
    public class ProductItem : BaseEntity<int>
    {
        /// <summary>
        /// 商家Id
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 产品的id(可能为空)
        /// </summary>
        public int ProductId { get; set; }

        /// <summary>
        /// 商品所属的叶子类目 id
        /// </summary>
        public int CategoryId { get; set; }

        /// <summary>
        /// 根类目Id
        /// </summary>
        public int CategoryRootId { get; set; }

        /// <summary>
        /// 子类目字符串不包含rooid categoryid
        /// </summary>
        public string CategoryMiddleId { get; set; }

        /// <summary>
        /// 商家设置的外部id
        /// </summary>
        public string OuterId { get; set; }

        /// <summary>
        /// 品牌Id
        /// </summary>
        public int BrandId { get; set; }

        /// <summary>
        /// 品牌名
        /// </summary>
        public string BrandName { get; set; }

        /// <summary>
        /// 商品名称,不能超过60字节
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        ///  副名称 促销信息
        /// </summary>
        public string SubName { get; set; }

        /// <summary>
        /// 商品价格
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 商品数量
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 积分奖励
        /// </summary>
        public decimal RewardRate { get; set; }

        /// <summary>
        /// 商品属性 格式：pid:vid;pid:vid
        /// </summary>
        public string PropId { get; set; }

        /// <summary>
        /// 商品属性名称。标识着props内容里面的pid和vid所对应的名称。格式为：pid1:vid1:pid_name1:vid_name1;pid2:vid2:pid_name2:vid_name2……(注：属性名称中的冒号":"被转换为："#cln#"; 分号";"被转换为："#scln#" )
        /// </summary>
        public string PropStr { get; set; }

        /// <summary>
        /// 属性值别名,比如颜色的自定义名称 1627207:28335:草绿217;1627207:3232479:深紫501;
        /// </summary>
        public string PropAlias { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string InputId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string InputStr { get; set; }

        /// <summary>
        /// 商品主图片地址
        /// </summary>
        public string Picture { get; set; }

        /// <summary>
        /// 商品图片列表(包括主图)
        /// </summary>
        public string ItemImg { get; set; }

        /// <summary>
        /// 商品属性图片列表
        /// </summary>
        public string PropImg { get; set; }

        /// <summary>
        /// 商品描述, 字数要大于5个字符，小于300个字符
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 商品重量
        /// </summary>
        public decimal Weight { get; set; }

        /// <summary>
        /// 体积
        /// </summary>
        public string Size { get; set; }

        /// <summary>
        /// 是否为虚拟物品
        /// </summary>
        public bool IsVirtual { get; set; }

        /// <summary>
        /// 1为拍下减库存 2为付款减库存
        /// </summary>
        public byte SubStock { get; set; }

        /*
    /// <summary>
    /// 是否有发票
    /// </summary>
    public bool HasInvoice { get; set; }

    /// <summary>
    /// 是否有保修
    /// </summary>
    public bool HasWarranty { get; set; }

    /// <summary>
    /// 是否承诺退换货服务
    /// </summary>
    public bool SellPromise { get; set; }

    */

        /// <summary>
        /// 代充商品类型 可选类型： time_card(点卡软件代充) fee_card(话费软件代充)
        /// </summary>
        public byte AutoFill { get; set; }

        /// <summary>
        /// 橱窗推荐
        /// </summary>
        public int Showcase { get; set; }

        /// <summary>
        /// 是否定时上架商品
        /// </summary>
        public bool IsTiming { get; set; }

        /// <summary>
        /// 上架时间
        /// </summary>
        public DateTime OnlineTime { get; set; }

        /// <summary>
        /// 下架时间
        /// </summary>
        public DateTime OfflineTime { get; set; }

        /// <summary>
        /// 关联商品Id
        /// </summary>
        public string Relation { get; set; }

        /// <summary>
        /// 销售量
        /// </summary>
        public int Sale { get; set; }

        /// <summary>
        /// 收藏
        /// </summary>
        public int Collection { get; set; }

        /// <summary>
        /// 咨询
        /// </summary>
        public int Consultation { get; set; }

        /// <summary>
        /// 评论
        /// </summary>
        public int Commentation { get; set; }

        /// <summary>
        /// 商品上传后的状态
        /// </summary>
        public ProductItemStatus Status { get; set; }

        /// <summary>
        /// Sku列表
        /// </summary>
        public virtual IList<ProductItemSku> ProductItemSkus { get; set; }

    }
}

